package com.itheima.service.impl;

import com.itheima.bean.Student;
import com.itheima.mapper.StudentMapper;
import com.itheima.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("studentService")
public class StudentServiceImpl implements StudentService {
   @Autowired
    private StudentMapper mapper;
    @Override
    public List<Student> selectAll() {
        return mapper.selectAll();
    }
    @Override
    public Student selectById(Integer id) {

        return mapper.selectById(id);
    }
    @Override
    public Integer update(Student student) {
        return mapper.insert(student);
    }

    @Override
    public Integer delete(Integer id) {

        return mapper.delete(id);
    }
    @Override
    public Integer insert(Student student) {

        return mapper.insert(student);
    }


}
